<!DOCTYPE html>
<html>
<head>
    {include file="public/header" /}
</head>
<body>
<div style="padding-bottom:200px" class="layui-form layuimini-form">
    <!--<form class="layui-form" action="">-->
    <input type="hidden" name="id" value="{$res.id}" />

    <div class="layui-form-item">
        <label class="layui-form-label required">分类名称</label>
        <div class="layui-input-block">
            <input type="text" value="{$res.title}" name="title" lay-verify="required" lay-reqtext="名称不能为空" placeholder="请输入名称"  class="layui-input">
        </div>
    </div>
    <!--<div class="layui-form-item">-->
        <!--<label class="layui-form-label required">分类等级</label>-->
        <!--<div class="layui-input-block ">-->
            <!--{if condition="$res"}-->
            <!--<input type="text" disabled {if condition="$res.pid"} value="二级分类"  {else} value="一级分类" {/if}      class="layui-input">-->
            <!--{else}-->
            <!--<input type="text" disabled   value="二级分类"      class="layui-input">-->
            <!--{/if}-->
        <!--</div>-->
    <!--</div>-->




    <div class="layui-form-item">
        <label class="layui-form-label required">上级分类</label>
        <div class="layui-input-block ">
            <select name="pid"   >
                <option value="">请选择分类</option>
                {volist name='category_arr' id='v'}
                <option {if condition="$res.pid==$v.id"} selected {/if} value="{$v.id}">{$v.title}</option>
                {/volist}
            </select>
        </div>
    </div>

    <!--{if condition="$res"}-->
    <!--{if condition='$res.pid > 0'}-->
    <!--<div class="layui-form-item">-->
        <!--<label class="layui-form-label required">上级分类</label>-->
        <!--<div class="layui-input-block ">-->
            <!--<select name="pid"   >-->
                <!--{volist name='category_arr' id='v'}-->
                <!--<option {if condition="$res.pid==$v.id"} selected {/if} value="{$v.id}">{$v.title}</option>-->
                <!--{/volist}-->
            <!--</select>-->
        <!--</div>-->
    <!--</div>-->
    <!--{/if}-->
   <!--{else}-->
    <!--<div class="layui-form-item">-->
        <!--<label class="layui-form-label required">上级分类</label>-->
        <!--<div class="layui-input-block ">-->
            <!--<select name="pid"   >-->
                <!--{volist name='category_arr' id='v'}-->
                <!--<option {if condition="$res.pid==$v.id"} selected {/if} value="{$v.id}">{$v.title}</option>-->
                <!--{/volist}-->
            <!--</select>-->
        <!--</div>-->
    <!--</div>-->
    <!--{/if}-->

    {if condition='$res.pid < 0'}
    <div class="layui-form-item">
        <label class="layui-form-label required">显示位置</label>
        <div class="layui-input-block ">
            <select name="position"  >
                {volist name='category_position_arr' id='v'}
                <option {if condition="$res.position==$v.id"} selected {/if} value="{$v.id}">{$v.title}</option>
                {/volist}
            </select>
        </div>
    </div>
    {/if}


    
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
        </div>
    </div>


    <!--</form>-->
</div>
{include file="public/footer" /}
<script src="/static/admin/category/saveinfo.js?v={$Think.const.TIMESTAMP}" charset="utf-8"></script>



</body>
</html>